package com.ruoyi.cms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.CmsArticleInputFileMapper;
import com.ruoyi.cms.domain.CmsArticleInputFile;
import com.ruoyi.cms.service.ICmsArticleInputFileService;

/**
 * 文章导入Service业务层处理
 * 
 * @author fyliu
 * @date 2025-04-14
 */
@Service
public class CmsArticleInputFileServiceImpl implements ICmsArticleInputFileService 
{
    @Autowired
    private CmsArticleInputFileMapper cmsArticleInputFileMapper;

    /**
     * 查询文章导入
     * 
     * @param id 文章导入主键
     * @return 文章导入
     */
    @Override
    public CmsArticleInputFile selectCmsArticleInputFileById(Long id)
    {
        return cmsArticleInputFileMapper.selectCmsArticleInputFileById(id);
    }

    /**
     * 查询文章导入列表
     * 
     * @param cmsArticleInputFile 文章导入
     * @return 文章导入
     */
    @Override
    public List<CmsArticleInputFile> selectCmsArticleInputFileList(CmsArticleInputFile cmsArticleInputFile)
    {
        return cmsArticleInputFileMapper.selectCmsArticleInputFileList(cmsArticleInputFile);
    }

    /**
     * 新增文章导入
     * 
     * @param cmsArticleInputFile 文章导入
     * @return 结果
     */
    @Override
    public int insertCmsArticleInputFile(CmsArticleInputFile cmsArticleInputFile)
    {
        cmsArticleInputFile.setCreateTime(DateUtils.getNowDate());
        return cmsArticleInputFileMapper.insertCmsArticleInputFile(cmsArticleInputFile);
    }

    /**
     * 修改文章导入
     * 
     * @param cmsArticleInputFile 文章导入
     * @return 结果
     */
    @Override
    public int updateCmsArticleInputFile(CmsArticleInputFile cmsArticleInputFile)
    {
        cmsArticleInputFile.setUpdateTime(DateUtils.getNowDate());
        return cmsArticleInputFileMapper.updateCmsArticleInputFile(cmsArticleInputFile);
    }

    /**
     * 批量删除文章导入
     * 
     * @param ids 需要删除的文章导入主键
     * @return 结果
     */
    @Override
    public int deleteCmsArticleInputFileByIds(Long[] ids)
    {
        return cmsArticleInputFileMapper.deleteCmsArticleInputFileByIds(ids);
    }

    /**
     * 删除文章导入信息
     * 
     * @param id 文章导入主键
     * @return 结果
     */
    @Override
    public int deleteCmsArticleInputFileById(Long id)
    {
        return cmsArticleInputFileMapper.deleteCmsArticleInputFileById(id);
    }
}
